﻿using System;

namespace WmsApp.WindowControl.PriceAndAmount
{
    public class PriceAndAmountArithNotTax : PriceAndAmountArithBase
    {
        public PriceAndAmountArithNotTax(decimal taxRate, decimal price, decimal quantity)
            : base(taxRate, price, quantity)
        {
            
        }

        private decimal priceTax = 0;
        protected override void Compute()
        {
            this.PriceNotTax = Price;
            priceTax = (1 + TaxRate) * PriceNotTax;
            this.PriceTax = Math.Round(priceTax,2);
            AmountTax = Math.Round(this.priceTax * Quantity,2);
            AmountNotTax = Math.Round(this.PriceNotTax * Quantity,2);
        }
    }
}